Make GtkEntry set the style context state.
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 17 Jan 2011 02:54:58 +0000 (03:54 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 17 Jan 2011 03:43:23 +0000 (04:43 +0100)
gtk/gtkentry.c

index bb207310f1db920d25e7bcc46f6197487ab8eb33..0b905db13ff9df14fc9b81289f527b2dcf81a780 100644 (file)
@@ -3506,6 +3506,9 @@ gtk_entry_draw (GtkWidget *widget,
   if (gtk_widget_has_focus (widget))
     state |= GTK_STATE_FLAG_FOCUSED;
 
+  gtk_style_context_save (context);
+  gtk_style_context_set_state (context, state);
+
   if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
     {
       /* Draw entry_bg, shadow, progress and focus */
@@ -3547,6 +3550,8 @@ gtk_entry_draw (GtkWidget *widget,
         }
     }
 
+  gtk_style_context_restore (context);
+
   return FALSE;
 }